﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace $safeprojectname$
{
    /// <summary>html &lt;DL&gt; element</summary>
    public class DefinitionList : ContentControl<ICoreModel, IVisualControl, DefinitionList>
    {
        // contructor
        public DefinitionList(PercentForLabel percentForLabel = PercentForLabel.p40, string cssClassName = null)
            : base(cssClassName)
        {
            AddCssClassName(percentForLabel.ToString());
        }

        // override Add()

        // properties
        protected override string TagName
        {
            get { return Tag.DL; }
        }

        public override void Add(IVisualControl content)
        {
            if (content.Is()
                && content is IPropertyControl)
            {
                base.Add(new DefinitionListItem { content, });
                return;
            }
            base.Add(content);
        }
    }
}